#coding=utf-8
#author:dn_李四海(qq:653378495)
#动脑学院VIP
#1.用while和for两种循环求计算1+3+5.....+45+47+49的值
# num = 0
# num2 = 49
# while num2 > 0:
#     num += num2
#     num2 -= 2
# print(num)
#
# num = 0
# for n in range(49+1):
#     if n%2!=0:
#         num += n
# print(num)
# 2.代码实现斐波那契数列(比如前30个项)
i,j = 0,1
for n in range(30):
        print(i)
        i,j = j,i+j